#ifndef SIGNALPROCESSOR_H
#define SIGNALPROCESSOR_H
#include <Eigen/Dense>
#include <complex>
#include <QVector>
#include <vector>
#include<qmath.h>

using namespace Eigen;
class SignalProcessor
{
public:
    SignalProcessor(double fc, double fs, double T, double snr);

    QVector<double> generateSignalRealValues();
    QVector<double> generateSignalImagValues();
    QVector<double> linSpace(double step, double start, double end);
    RowVectorXd QVectorToRowVectorXd(const QVector<double>& qVector);
    RowVectorX<std::complex<double>> genSig(double fc, double fs, double phi_0, double pw, double snr, const std::string& type);
    RowVectorX<std::complex<double>> generateSignal(double phaseOffset);

private:
    double fc;  // 载波频率
    double fs;  // 采样率
    double T;   // 时间
    double snr; // 信噪比
    RowVectorX<std::complex<double>> sigCh1;
};

#endif // SIGNALPROCESSOR_H
